package com.woniu.gf.pawn.management.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniu.gf.pawn.comm.core.domain.Management;
import com.woniu.gf.pawn.management.dao.ManagementMapper;
import com.woniu.gf.pawn.management.param.SelectManagementParam;
import com.woniu.gf.pawn.management.service.ManagementService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Lucas
 * @since 2020-10-13
 */
@Service
public class ManagementServiceImpl extends ServiceImpl<ManagementMapper, Management> implements ManagementService {
    @Autowired
    private ManagementMapper managementMapper;
    @Override
    public IPage<Management> selectPageManagement(SelectManagementParam selectManagementParam) {
        Page<Management> managementPage = new Page<>(selectManagementParam.getPageIndex(),selectManagementParam.getPageSize());
        IPage<Management> managementIPage=managementMapper.selectPageManagement(managementPage,
                selectManagementParam.getManagementName(), selectManagementParam.getManagementPhone(),selectManagementParam.getManagementStatus(),
                selectManagementParam.getManagementAddTimeBefore(),selectManagementParam.getManagementAddTimeAfter());
        return managementIPage;
    }
}
